package com.dh.weibo.pojo;

import com.dh.weibo.util.DateTimeUtil;
import com.dh.weibo.util.IDUtil;
import com.dh.weibo.util.Md5Util;

public class User extends Base {
    private String uid;// 用户的唯一标识
    private String account;
    private String passWord;
    private String nickName;
    private boolean isSuper;
    private int status;//0正常 -1冻结


    public User(String account, String passWord, String nickName) {
        super(DateTimeUtil.getCurrentTimeMillis(), DateTimeUtil.getCurrentTimeMillis());
        this.uid = IDUtil.createID();
        this.account = account;
        this.passWord = Md5Util.getMD5Str(passWord);// 加密
        this.nickName = nickName;
        this.status = 0;// 正常用户
        this.isSuper = false;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getAccount() {
        return account;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getPassWord() {
        return passWord;
    }

    public boolean isSuper() {
        return isSuper;
    }

    public void setSuper(boolean aSuper) {
        isSuper = aSuper;
    }

    public String getUid() {
        return uid;
    }

    @Override
    public String toString() {
        return "User{" +
                "uid='" + uid + '\'' +
                ", account='" + account + '\'' +
                ", nickName='" + nickName + '\'' +
                ", isSuper=" + isSuper +
                ", status=" + status +
                '}';
    }
}
